<template>
    <div class="box">
        <h1>组件间通信: $attrs与$listeners</h1>
        <h2>需求: 自定义带Hover提示的按钮</h2>

        <br>

        <HintButton type="primary" content="添加" name="qwer" id="asd"></HintButton>
        <HintButton type="success" content="删除" size="mini" round class="abc" style="color:red;" @click="clickHandler" @abc="abcHandler"></HintButton>
    </div>
</template>

<script>
import HintButton from './HintButton.vue';
export default {
    name: "AttrsListenersTest",
    components: { HintButton },
    methods: {
        clickHandler() {
            console.log('触发了click');
        },
        abcHandler() {
            console.log('触发了组件abc');
        }
    }
    

}
</script>

<style scoped>

</style>